﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 销售订单:客户报价单基础输入参数
/// </summary>
public class CustomerQuotationBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 客户编号
    /// </summary>
    public virtual long? CustomerID { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public virtual long? CustomerName { get; set; }
    
    /// <summary>
    /// 线别
    /// </summary>
    public virtual string? LineType { get; set; }
    
    /// <summary>
    /// 型号
    /// </summary>
    public virtual long? Model { get; set; }
    
}

/// <summary>
/// 销售订单:客户报价单分页查询输入参数
/// </summary>
public class PageCustomerQuotationInput : BasePageInput
{
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 线别
    /// </summary>
    public string? LineType { get; set; }
    
    /// <summary>
    /// 创建时间范围
    /// </summary>
     public DateTime?[] CreateTimeRange { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 销售订单:客户报价单增加输入参数
/// </summary>
public class AddCustomerQuotationInput
{
    /// <summary>
    /// 客户编号
    /// </summary>
    public long? CustomerID { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 线别
    /// </summary>
    [MaxLength(32, ErrorMessage = "线别字符长度不能超过32")]
    public string? LineType { get; set; }
    
    /// <summary>
    /// 型号
    /// </summary>
    public long? Model { get; set; }
    
}

/// <summary>
/// 销售订单:客户报价单删除输入参数
/// </summary>
public class DeleteCustomerQuotationInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 销售订单:客户报价单更新输入参数
/// </summary>
public class UpdateCustomerQuotationInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 客户编号
    /// </summary>    
    public long? CustomerID { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>    
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 线别
    /// </summary>    
    [MaxLength(32, ErrorMessage = "线别字符长度不能超过32")]
    public string? LineType { get; set; }
    
    /// <summary>
    /// 型号
    /// </summary>    
    public long? Model { get; set; }
    
}

/// <summary>
/// 销售订单:客户报价单主键查询输入参数
/// </summary>
public class QueryByIdCustomerQuotationInput : DeleteCustomerQuotationInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataCustomerQuotationInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 销售订单:客户报价单数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportCustomerQuotationInput : BaseImportInput
{
    /// <summary>
    /// 客户编号 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? CustomerID { get; set; }
    
    /// <summary>
    /// 客户编号 文本
    /// </summary>
    [ImporterHeader(Name = "客户编号")]
    [ExporterHeader("客户编号", Format = "", Width = 25, IsBold = true)]
    public string CustomerFkDisplayName { get; set; }
    
    /// <summary>
    /// 客户名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 客户名称 文本
    /// </summary>
    [ImporterHeader(Name = "客户名称")]
    [ExporterHeader("客户名称", Format = "", Width = 25, IsBold = true)]
    public string CustomerNameFkDisplayName { get; set; }
    
    /// <summary>
    /// 线别
    /// </summary>
    [ImporterHeader(Name = "线别")]
    [ExporterHeader("线别", Format = "", Width = 25, IsBold = true)]
    public string? LineType { get; set; }
    
    /// <summary>
    /// 型号 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Model { get; set; }
    
    /// <summary>
    /// 型号 文本
    /// </summary>
    [ImporterHeader(Name = "型号")]
    [ExporterHeader("型号", Format = "", Width = 25, IsBold = true)]
    public string ModelFkDisplayName { get; set; }
    
}
